<div class="search-box">
	<form class="search_form layui-form" lay-filter="pinvoice_search_form">
		<div class="layui-inline">
			<label class="layui-form-label">发票抬头</label>
			<div class="layui-input-inline">
				<input type="text" name="invoice_title" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">税号</label>
			<div class="layui-input-inline">
				<input type="text" name="invoice_duty" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">订单号</label>
			<div class="layui-input-inline">
				<input type="text" name="order_no" autocomplete="off" placeholder="完整订单号" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">库房</label>
			<div class="layui-input-inline">
				<input type="text" name="susername" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">章</label>
			<div class="layui-input-inline search-radio-box">
				<input type="radio" name="supplier_picture" value="" title="全部" checked>
				<input type="radio" name="supplier_picture" value="1" title="已传">
				<input type="radio" name="supplier_picture" value="2" title="未传">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">开票</label>
			<div class="layui-input-inline search-radio-box">
				<input type="radio" name="state" value="" title="全部" checked>
				<input type="radio" name="state" value="1" title="未开">
				<input type="radio" name="state" value="2" title="已开">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">供货商开票</label>
			<div class="layui-input-inline search-radio-box">
				<input type="radio" name="gys_state" value="" title="全部" checked>
				<input type="radio" name="gys_state" value="1" title="未开">
				<input type="radio" name="gys_state" value="2" title="已开">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">收款</label>
			<div class="layui-input-inline search-radio-box">
				<input type="radio" name="order_shoukuan" value="" title="全部" checked>
				<input type="radio" name="order_shoukuan" value="1" title="未收">
				<input type="radio" name="order_shoukuan" value="2" title="已收">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label">付款</label>
			<div class="layui-input-inline search-radio-box">
				<input type="radio" name="order_fukuan" value="" title="全部" checked>
				<input type="radio" name="order_fukuan" value="1" title="未付">
				<input type="radio" name="order_fukuan" value="2" title="已付">
			</div>
		</div>
		
		<div class="pack-up"></div>
	</form>
</div>
<div id="view_pic" style="display: none; ">
	<div id="view-pic-box" style="padding: 40px; display: flex; flex-wrap: wrap;">
		
	</div>
</div>
<table class="layui-hide" id="pinvoice_list" lay-filter="pinvoice_list"></table>

<script>
	
	var invoice_list_url = "{:url('Invoice/ajaxList')}",
		invoice_detail_url = "{:url('Invoice/detail')}",
		invoice_view_url = "{:url('Invoice/views')}",
		invoice_find_url = "{:url('Invoice/ajaxFind')}",
		invoice_verify = "{:url('Invoice/verify')}",
		invoice_save_invoice_url = "{:url('Invoice/saveInvoice')}",
		invoice_ajax_delete_url = "{:url('Invoice/ajaxDelete')}",
		invoice_cols = {$cols},
		excel_sale_invoice_url = "{:url('Invoice/excelSaleInvoice')}",
		excel_gys_invoice_url = "{:url('Invoice/excelGysInvoice')}",
		send_invoice_sms_url = "{:url('invoice/sendSms')}",
		zip_down_url = "{:url('Invoice/zipDownAll')}",
		order_detail_url = "{:url('order/detail')}",
		qingkuanfapiao_uri = "{:url('invoice/qingkuanfapiao')}",
		search_export_uri = "{:url('invoice/searchExport')}",
		upload_uri = "{:url('Upload/uploadOne')}",
		member_id = "{$member_info.member_id}";
</script>
<script src="/static/js/invoice/pindex.js" type="text/javascript" charset="utf-8"></script>
<script type="text/html" id="pinvoiceToolbar">
	<div class="layui-btn-container">
	<a type="button" data-url="{:url('Invoice/sendsms')}" data-title="发送付款短信" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="sendfkSMS"><i class="layui-icon layui-icon-cellphone-fine"></i>发送付款短信</a>
	<a type="button" data-url="{:url('Invoice/zipDownAll')}" data-title="下载文件" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="downFile"><i class="layui-icon layui-icon-download-circle"></i>下载文件</a>
	<a style="display: none;" type="button" data-url="{:url('Invoice/allpay')}" data-title="统一全部付款" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="invoiceAllpay"><i class="layui-icon layui-icon-tabs"></i>统一全部付款</a>
	<a type="button" data-url="{:url('Invoice/daorufukuan')}" data-title="导入付款单" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="applyFukuan"><i class="layui-icon layui-icon-tabs"></i>导入付款单</a>
	<a type="button" data-title="导出合同" class="layui-btn layui-btn-normal layui-btn-sm qingkuanfapiao"><i class="layui-icon layui-icon-tabs"></i>导出合同</a>
	<a type="button" data-title="导出采购合同" class="layui-btn layui-btn-normal layui-btn-sm daochuchaxun" lay-event="daochuchaxun"><i class="layui-icon layui-icon-tabs"></i>导出采购合同</a>
	</div>
</script>

<script type="text/html" id="pinvoice_tool">
	<div class="layui-btn-group">
		{{# if(d.caigou_invoice_pz_info.length >0) { }}
		<a data-title="查看发票" class="layui-btn layui-btn-xs" lay-event="viewInvoice"><i class="layui-icon layui-icon-file-b"></i></a>
		{{#}}}
		<a class="layui-btn layui-btn-danger layui-btn-xs hide-update" lay-event="update"><i class="layui-icon layui-icon-up"></i></a>
	</div>
</script>
<script type="text/html" id="supplier_pictureTpl">
	{{# if(d.supplier_picture == null){}}
	<div class="layui-anim circle layui-bg-red" data-title="未传">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-green" data-title="已传">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="stateTpl">
	{{# if(d.state == 1){}}
	<div class="layui-anim circle layui-bg-red" data-title="未开">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }else if(d.state == 3) { }}
	<div class="layui-anim circle layui-bg-cyan" data-title="已被驳回">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-green" data-title="已开">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="order_shoukuanTpl">
	{{# if(d.order_shoukuan == 1){}}
	<div class="layui-anim circle layui-bg-red" data-title="未收">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }else if(d.order_shoukuan == 2) { }}
	<div class="layui-anim circle layui-bg-green" data-title="全收">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }else if(d.order_shoukuan == 3) { }}
	<div class="layui-anim circle layui-bg-cyan" data-title="部分收">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }else if(d.order_shoukuan == 4) { }}
	<div class="layui-anim circle layui-bg-blue" data-title="质保金收">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-red" data-title="未收">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="order_fukuanTpl">
	{{# if(d.order_fukuan == 1){}}
	<div class="layui-anim circle layui-bg-red" data-title="未付">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }else if(d.order_fukuan == 2) { }}
	<div class="layui-anim circle layui-bg-green" data-title="全部付">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }else if(d.order_fukuan == 3) { }}
	<div class="layui-anim circle layui-bg-cyan" data-title="部分付">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }else if(d.order_fukuan == 4) { }}
	<div class="layui-anim circle layui-bg-blue" data-title="质保金付">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-red" data-title="未付">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="builder_typeTpl">
	{{# if(d.builder_type == 1){}}
	<div class="layui-anim circle layui-bg-red" data-title="纸质发票">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-blue" data-title="电子发票">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="draw_stateTpl">
	{{# if(d.draw_state == 1){}}
	<div class="layui-anim circle layui-bg-green" data-title="已领取">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-red" data-title="未领取">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="gys_stateTpl">
	{{# if(d.caigou_invoice_pz_info.length == 0){}}
	<div class="layui-anim circle layui-bg-red" data-title="未开">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-green" data-title="已开">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="caigou_stateTpl">
	{{# if(d.caigou_state == 1){}}
	<div class="layui-anim circle layui-bg-green" data-title="已审">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-red" data-title="未审">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="caigou_hetongTpl">
{{# if(d.caigou_hetong){}}
	<div class="layui-anim circle layui-bg-green" data-title="已传">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-red" data-title="未传">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>

<script type="text/html" id="post_stateTpl">
	{{# if(d.post_state == 1){}}
	<div class="layui-anim circle layui-bg-green" data-title="已送">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-red" data-title="未送">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>
<script type="text/html" id="receive_stateTpl">
	{{# if(d.receive_state == 1){}}
	<div class="layui-anim circle layui-bg-green" data-title="已收">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# } else {}}
	<div class="layui-anim circle layui-bg-red" data-title="未收">
		<i class="layui-icon layui-icon-radio"></i>
	</div>
	{{# }}}
</script>

